package com.bootcamp.idea1125.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;
import java.util.Map;

/**
 * @program: spring-boot
 * @description:
 * @author: Keyu Li
 * @create: 2021-11-26 15:00
 **/


@Data
@ConfigurationProperties(prefix = "user")
public class UserProperties {
    // 基本类型，包装类，string
    String name;
    Integer age;
    boolean open;

    // 数组，list
    String[] array1;
    String[] array2;
    List<String> list1;
    List list2;

    Map map1;
    Map map2;

    List<Order> orders;
}

@Data
class Order{
    String name;
    Double money;
    List goods;
}
